home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / -seriously_amiga- / shareware / graphics / povray3 / povray3_060 / include / skies.inc < prev    next >
Text File  |  1997-12-12  |  8KB  |  342 lines

  1. #ifdef(Skies_Inc_Temp)
  2. // do nothing
  3. #else
  4. #declare Skies_Inc_Temp = version
  5. #version 3.0
  6.  
  7. #ifdef(View_POV_Include_Stack)
  8. #   debug "including skies.inc\n"
  9. #end
  10.  
  11. /*
  12.  
  13.               Persistence of Vision Raytracer Version 3.0
  14.  
  15.   Contents:
  16.     Pigments:    (building blocks for the stuff below)
  17.     P_Cloud1     pigment layer, contains clear regions.  Use with background.
  18.     P_Cloud2     pigment layer, contains clear regions.  Use with background.
  19.     P_Cloud3     pigment layer, contains clear regions.  Use with background.
  20.  
  21.     SkySpheres:
  22.     S_Cloud1     sky_sphere, uses P_Cloud2.
  23.     S_Cloud2     sky_sphere  uses P_Cloud2.
  24.     S_Cloud3     sky_sphere  uses P_Cloud3.
  25.     S_Cloud4     sky_sphere  uses P_Cloud3.
  26.     S_Cloud5     sky_sphere.  Opaque.
  27.  
  28.     Textures:
  29.     T_Cloud1     2-layer texture using P_Cloud1 pigment, contains clear regions.
  30.     T_Cloud2     1-layer texture, contains clear regions.
  31.     T_Cloud3     2-layer texture, contains clear regions.
  32.  
  33.     Objects:
  34.     O_Cloud1     sphere, radius 10000 with T_Cloud1 texture.
  35.     O_Cloud2     union of 2 planes, with T_Cloud2 and T_Cloud3.
  36.  
  37. */
  38.  
  39. #declare P_Cloud1 =
  40. pigment {
  41.     bozo
  42.     turbulence 0.65
  43.     octaves 6
  44.     omega 0.7
  45.     lambda 2
  46.     color_map {
  47.         [0.0, 0.1   color red 0.85 green 0.85 blue 0.85
  48.                     color red 0.75 green 0.75 blue 0.75]
  49.         [0.1, 0.5   color red 0.75 green 0.75 blue 0.75
  50.                     color Clear]
  51.         [0.5, 1.001 color Clear
  52.                     color Clear]
  53.     }
  54.     scale <6, 1, 6>
  55. }
  56.  
  57. #declare P_Cloud2 =
  58. pigment {
  59.     wrinkles
  60.     turbulence 0.65
  61.     octaves 6
  62.     omega 0.7
  63.     lambda 2
  64.     color_map {
  65.         [0.0, 0.1   color red 0.85 green 0.85 blue 0.85
  66.                     color red 0.75 green 0.75 blue 0.75]
  67.         [0.1, 0.5   color red 0.75 green 0.75 blue 0.75
  68.                     color rgb <0.258, 0.258, 0.435>  ]
  69.         [0.5, 1.001 color rgb <0.258, 0.258, 0.435>
  70.                     color rgb <0.258, 0.258, 0.435> ]
  71.     }
  72.     scale <6, 1, 6>
  73. }
  74. #declare P_Cloud3 =
  75. pigment {
  76.     bozo
  77.     color_map {
  78.         [0.0, 0.1   color red 0.85 green 0.85 blue 0.85
  79.                     color red 0.55 green 0.60 blue 0.65]
  80.         [0.1, 0.5   color red 0.55 green 0.60 blue 0.65
  81.                     color rgb <0.184, 0.184, 0.309> ]
  82.         [0.5, 1.001 color rgb <0.184, 0.184, 0.309>
  83.                     color rgb <0.1, 0.1, 0.2>]
  84.     }
  85.     turbulence 0.65
  86.     octaves 6
  87.     omega 0.707
  88.     lambda 2
  89.     scale <6, 4, 6>
  90. }
  91.  
  92. #declare P_Cloud4 =
  93. pigment {
  94.     wrinkles
  95.     turbulence 0.1
  96.     lambda 2.2
  97.     omega 0.707
  98.     color_map {
  99.         [0.20 SkyBlue * 0.85 ]
  100.         [0.50 White ]
  101.         [1.00 Gray70 ]
  102.     }
  103.     scale <0.5, 0.15, 1>
  104. }
  105.  
  106. #declare S_Cloud1 =
  107. sky_sphere {
  108.     pigment {
  109.         gradient y
  110.         pigment_map {
  111.             [0.01 rgb <0.847, 0.749, 0.847> ] // horizon
  112.             [0.25 P_Cloud2 scale 0.25 rotate z*5]
  113.             [0.60 P_Cloud3 scale <0.25, 0.15, 0.25> rotate z*10]
  114.         }
  115.     }
  116. }
  117.  
  118. #declare S_Cloud2 =
  119. sky_sphere {
  120.     pigment {
  121.         gradient y
  122.         pigment_map {
  123.             [0.00 rgb <0.847, 0.749, 0.847> ] // horizon
  124.             [0.10 SkyBlue ]                   // horizon
  125.             [0.20 P_Cloud4 ]
  126.         }
  127.     }
  128. }
  129.  
  130. #declare S_Cloud3 =
  131. sky_sphere {
  132.     pigment {
  133.         gradient y
  134.         pigment_map {
  135.             [0.10 rgb <0.258, 0.258, 0.435> ]
  136.             [0.25 P_Cloud2 scale 0.15 ]
  137.         }
  138.     }
  139. }
  140.  
  141. #declare S_Cloud4 =
  142. sky_sphere {
  143.     pigment {
  144.         gradient y
  145.         pigment_map {
  146.             [0.00 rgb <0.184, 0.184, 0.309> ]
  147.             [0.15 P_Cloud3 scale <0.05, 0.40, 0.05> rotate z*30 ]
  148.             [0.45 P_Cloud3 scale <0.25, 0.15, 0.50> ]
  149.         }
  150.     }
  151. }
  152.  
  153.  
  154. #declare S_Cloud5 =
  155. sky_sphere {
  156.     pigment { rgb <0.258, 0.258, 0.435> }
  157.     pigment {
  158.         bozo
  159.         turbulence 1.5
  160.         octaves 10
  161.         omega .5
  162.         lambda 2.5
  163.         color_map {
  164.             [0.0, 0.5 color rgbf<.75, .75, .75, 0>
  165.                       color rgbf<.9, .9, .9, .9> ]
  166.             [0.5, 0.7 color rgbf<.9, .9, .9, .9>
  167.                       color rgbf<1, 1, 1, 1> ]
  168.             [0.7, 1.0 color rgbf<1, 1, 1, 1>
  169.                       color rgbf<1, 1, 1, 1> ]
  170.         }
  171.     scale <1, 0.3, 10>
  172.     }
  173.     pigment {
  174.         bozo
  175.         turbulence 0.6
  176.         octaves 10
  177.         omega .5
  178.         lambda 2.5
  179.         color_map {
  180.             [0.0, 0.4 color rgbf<.75, .75, .75, 0>
  181.                       color rgbf<.9, .9, .9, .9> ]
  182.             [0.4, 0.7 color rgbf<.9, .9, .9, .9>
  183.                       color rgbf<1, 1, 1, 1> ]
  184.             [0.7, 1.0 color rgbf<1, 1, 1, 1>
  185.                       color rgbf<1, 1, 1, 1> ]
  186.         }
  187.     scale <1, 0.3, 10>
  188.     }
  189.     pigment {
  190.         bozo
  191.         turbulence 0.8
  192.         octaves 10
  193.         omega .5
  194.         lambda 2.5
  195.         color_map {
  196.             [0.0, 0.4 color rgbf<.75, .75, .75, 0>
  197.                       color rgbf<.9, .9, .9, .9> ]
  198.             [0.4, 0.6 color rgbf<.9, .9, .9, .9>
  199.                       color rgbf<1, 1, 1, 1> ]
  200.             [0.6, 1.0 color rgbf<1, 1, 1, 1>
  201.                       color rgbf<1, 1, 1, 1> ]
  202.         }
  203.     scale <1, 0.3, 10>
  204.     }
  205. }
  206.  
  207.  
  208. // ***********************************
  209. //  Bill Pulver's FBM Clouds
  210. // A three-layer cloud texture.
  211. // ***********************************
  212. #declare T_Cloud1 =
  213. texture {                              // The upper part of the clouds
  214.     pigment {
  215.         P_Cloud1
  216.     }
  217.     finish {
  218.         ambient 1.0
  219.         diffuse 0
  220.     }
  221. }
  222. texture {                              // The darker underside of the clouds
  223.     pigment {
  224.         P_Cloud1
  225.         translate -0.15*y
  226.     }
  227.     finish {
  228.         ambient 0.6
  229.         diffuse 0
  230.     }
  231. }
  232.  
  233. // T_Cloud1 mapped onto a sphere
  234. #declare O_Cloud1 =
  235. sphere { <0,0,0>, 10000
  236.     texture {
  237.         T_Cloud1
  238.         scale 1000
  239.     }
  240. }
  241.  
  242. // ***********************************
  243. //  Darin Dugger's "Kite" clouds
  244. // ***********************************
  245. #declare T_Cloud2 =
  246. texture {
  247.     pigment {
  248.         bozo
  249.         turbulence 1.5
  250.         octaves 10
  251.         omega .5
  252.         lambda 2.5
  253.         color_map {
  254.             [0.0, 0.5 color rgbf<.75, .75, .75, 0>
  255.                       color rgbf<.9, .9, .9, .9> ]
  256.             [0.5, 0.7 color rgbf<.9, .9, .9, .9>
  257.                       color rgbf<1, 1, 1, 1> ]
  258.             [0.7, 1.0 color rgbf<1, 1, 1, 1>
  259.                       color rgbf<1, 1, 1, 1> ]
  260.         }
  261.     }
  262.  
  263.     finish {
  264.         ambient 0.9
  265.         diffuse 0.1
  266.     }
  267. }
  268.  
  269. #declare T_Cloud3 =
  270. texture {
  271.     pigment {
  272.         bozo
  273.         turbulence 0.8 //0.6
  274.         octaves 10
  275.         omega .5
  276.         lambda 2.5
  277.         color_map {
  278.             [0.0, 0.4 color rgbf<.75, .75, .75, 0>
  279.                       color rgbf<.9, .9, .9, .9> ]
  280.             [0.4, 0.7 color rgbf<.9, .9, .9, .9>
  281.                       color rgbf<1, 1, 1, 1> ]
  282.             [0.7, 1.0 color rgbf<1, 1, 1, 1>
  283.                       color rgbf<1, 1, 1, 1> ]
  284.         }
  285.     }
  286.     finish {
  287.         ambient 1.0
  288.         diffuse 0.0
  289.     }
  290. }
  291. texture {
  292.     pigment {
  293.         bozo
  294.         turbulence 0.8 //0.6
  295.         octaves 10
  296.         omega .5
  297.         lambda 2.5
  298.         color_map {
  299.             [0.0, 0.4 color rgbf<.75, .75, .75, 0>
  300.                       color rgbf<.9, .9, .9, .9> ]
  301.             [0.4, 0.6 color rgbf<.9, .9, .9, .9>
  302.                       color rgbf<1, 1, 1, 1> ]
  303.             [0.6, 1.0 color rgbf<1, 1, 1, 1>
  304.                       color rgbf<1, 1, 1, 1> ]
  305.         }
  306.     }
  307.     finish {
  308.         ambient 0.95
  309.         diffuse 0.0
  310.     }
  311. scale .9
  312. translate y*-0.15
  313. }
  314.  
  315.  
  316.  
  317.  
  318.  
  319. // Darin Dugger's DD_Cloud_Sky texture mapped onto a pair of planes
  320. // NOTE: Lowest plane is at y=500
  321. #declare O_Cloud2 =
  322. union {
  323.     plane { y, 500
  324.         texture {
  325.             T_Cloud3
  326.             scale 600
  327.         }
  328.     }
  329.     plane { y, 3000
  330.         texture {
  331.             T_Cloud2
  332.             scale <900,1,6000>
  333.             translate x*3000
  334.             rotate -30*y
  335.         }
  336.     }
  337. }
  338.  
  339.  
  340. #version Skies_Inc_Temp
  341. #end
  342.